]> dgit.raspbian.org Git - gnome-shell.git/commit
st/theme-context: Also remove theme nodes on stylesheet changes
authorJonas Dreßler <verdre@v0yd.nl>
Sat, 25 Apr 2020 11:17:13 +0000 (13:17 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 28 Apr 2020 19:53:58 +0000 (19:53 +0000)
commit4dfa39457e4ed16e7ae5168cf313dd9513b7fb03
treedf8e1d596d8ef7c600f9ca00efbfb3edabcf0c80
parent325ff73c5b94f713073f117f0cb6a01049c5052f
st/theme-context: Also remove theme nodes on stylesheet changes

StThemeNodes are built around the assumption that they're "immutable",
that means they are created once with certain parameters (that resolve
to certain css properties) and then replaced with new ones in case those
parameters changed.

Changes to the internal information stored by theme nodes (i.e. the css
properties, font names or the cached scale-factor) are not all handled
the same though: For changes to the font or the scale-factor we remove
all theme nodes from the cache and let the widgets which are on stage
generate new theme nodes. For changes to the css properties/the
stylesheet, we invalidate the properties of all theme nodes but keep
them in the cache using `_st_theme_node_reset_for_stylesheet_change()`.

So be a bit more consistent and handle changes to the css-properties/the
stylesheet stored by StThemeNodes the same way as changes to the font or
scale-factor.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1218
src/st/st-theme-context.c
src/st/st-theme-node-private.h
src/st/st-theme-node.c